using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class web_pages_nguoitimviec_hosodatao : System.Web.UI.UserControl
{
    public string act = "";
    public string id = "";
    public string name = "";
    public string sSQLSelect = "";
    Common comm = new Common();
    public DataTable dtt;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!(Session["NTV_id"] == null))
        {
            if (!string.IsNullOrEmpty(Request.Params["idnop"]))
            {
                id = Request.Params["idnop"];
                if (!string.IsNullOrEmpty(Request.Params["act"])) act = Request.Params["act"];
                if (act == "delnop")
                {
                    sSQLSelect = "delete from NguoiTimViec_nop_ho_so where ma_ho_so_VLT='" + id + "' and" +
                        " ma_ho_so_NTV='" + Session["NTV_id"].ToString() + "'";
                    //Response.Write(sSQLSelect);
                    int i=comm.execNoneQuery(sSQLSelect);
                    Response.Redirect("nguoitimviec_quanly.aspx?page=tuyendungnop");
                }
            }
            sSQLSelect = "SELECT ViecLamTrong_ho_so_tuyen_dung.ma_ho_so, DoanhNghiep_doanh_nghiep.ten_doanh_nghiep, ViecLamTrong_ho_so_tuyen_dung.tieu_de_ho_so, " +
                " ViecLamTrong_ho_so_tuyen_dung.so_luong_tuyen, DanhMuc_chuc_danh.ten_chuc_danh, NguoiTimViec_nop_ho_so.ma_ho_so_NTV, " +
                " NguoiTimViec_nop_ho_so.ma_ho_so_VLT, NguoiTimViec_nop_ho_so.ngay_nop, NguoiTimViec_nop_ho_so.mo_ta" +
                " FROM DoanhNghiep_doanh_nghiep INNER JOIN" +
                " ViecLamTrong_ho_so_tuyen_dung ON DoanhNghiep_doanh_nghiep.ma_doanh_nghiep = ViecLamTrong_ho_so_tuyen_dung.ma_doanh_nghiep INNER JOIN" +
                " DanhMuc_chuc_danh ON ViecLamTrong_ho_so_tuyen_dung.ma_chuc_danh = DanhMuc_chuc_danh.ma_chuc_danh CROSS JOIN" +
                " NguoiTimViec_nop_ho_so" +
                " WHERE ma_ho_so=ma_ho_so_VLT and ma_ho_so_NTV='" + Session["NTV_id"].ToString() + "'";
            dtt = comm.getDataTable(sSQLSelect);
            rpt_list_obj.DataSource = dtt;
            rpt_list_obj.DataBind();
        }
    }
    protected void rpt_list_obj_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
    }
}
